home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1996-10-30 | 32.7 KB | 637 lines | [ TEXT/DOCS]
Verb FilemakerLib.bringDBToFront Syntax FilemakerLib.bringDBToFront (db, theLayout = 0) Parameters db is the name or number of the database you want to make frontmost. theLayout (optional parameter) is the name or number of the layout. Action Makes the specified database the frontmost window in Filemaker. Returns True if the database was brought to front, false if the request failed. Examples FilemakerLib.bringDBToFront ("My Database") «Brings database "My Database" to front » true FilemakerLib.bringDBToFront ("U.S. States", 2) «Brings database to front and displays layout 2 » true FilemakerLib.bringDBToFront ("U.S. States", "One Page Per State") «Brings database to front and displays layout named "One Page Per State" » true FilemakerLib.bringDBToFront ("Non-existent database") » false Notes This is a rarely-needed verb. The FilemakerLib verbs do not require the acted-upon database to be frontmost. See Also FilemakerLib.bringToFront FilemakerLib.hideWindow FilemakerLib.showWindow FilemakerLib.getFrontDBName Verb FilemakerLib.bringToFront Syntax FilemakerLib.bringToFront () Parameters None. Action Makes Filemaker the frontmost application. Returns True if the command succeeds, false if it does not. Examples FilemakerLib.bringToFront () «Brings Filemaker to front » true Notes If Filemaker Pro is not already running, calling this verb will launch it. See Also FilemakerLib.bringDBToFront FilemakerLib.hideWindow FilemakerLib.showWindow FilemakerLib.getFrontDBName Verb FilemakerLib.close Syntax FilemakerLib.close (db) Parameters db is the name or number of the database to close. Action Closes the specified database. Returns True if successful, false if failed. Examples FilemakerLib.close (1) «Closes the frontmost database » true FilemakerLib.close ("My Database") «Closes database "My Database" » true See Also FilemakerLib.open FilemakerLib.quit FilemakerLib.hideWindow FilemakerLib.showWindow Verb FilemakerLib.countRecords Syntax FilemakerLib.countRecords (db, foundSet = true) Parameters db is the name or number of the database containing the records to count. foundSet (optional parameter) is a boolean. True to count only the current found set, false to count the entire database. Action Counts the number of records specified. Returns The number of records, or false if the request could not be performed. Examples FilemakerLib.countRecords ("U.S. States", false) «Counts number of records in database "U.S. States" » 50 Verb FilemakerLib.dbIsOpen Syntax FilemakerLib.dbIsOpen (db) Parameters db is the name or number of the database that may or not be open. Returns True if the database is open, false if it is not or if the request fails. Examples FilemakerLib.dbIsOpen ("My Database") «This database is open. » true FilemakerLib.dbIsOpen ("Non-existent database") » false See Also FilemakerLib.open FilemakerLib.close Verb FilemakerLib.deleteAllRecords Syntax FilemakerLib.deleteAllRecords (db, foundSet = true) Parameters db is the name or number of the database containing the records to delete. foundSet is a boolean, true by default. Action Deletes records in the database, either all records or all records in the current found set. Returns True if the records were deleted, false if not. Examples FilemakerLib.deleteAllRecords ("My Database", false) «"My Database" is now empty of data » true FilemakerLib.bringDBToFront ("U.S. States") «Deletes only records in the current found set. » true Notes This is a dangerous verb. There is no undo for deleted records. Pay special attention to whether or not you want the found set’s or the entire database’s records deleted. See Also FilemakerLib.deleteRecord Verb FilemakerLib.deleteRecord Syntax FilemakerLib.deleteRecord (db, recordNum, foundSet = true) Parameters db is the name or number of the database containing a record to delete. recordNum is the index of the record you want to delete. foundSet (optional, default is true) specifies whether the record is the nth record in the current found set (true) or in the database (false). Action Deletes the specified record. Returns True if the record was deleted, false if it was not. Examples FilemakerLib.deleteRecord ("U.S. States", 1, false) «"Alabama" has been deleted: now there are 49 states in the database. » true Notes This is a dangerous verb. There is no undo for deleting a record. Pay special attention to whether or not you want the found set’s or the entire database’s record deleted. See Also FilemakerLib.deleteAllRecords Verb FilemakerLib.find Syntax FilemakerLib.find (db, searchStringList, cellList, theLayout = 0) Parameters db is the name or number of the database in which to find records. searchStringList is a string or a list of search strings. cellList is a string or a list of cells to be searched. There is a one-to-one correspondence between strings in searchStringList and cellList. theLayout (optional, default is 0) specifies the layout on which to perform the find. Action Sets the current found set to records matching your find parameters. Returns The number of records in the current found set (0 or more) or false if for some reason the request could not be performed. Examples FilemakerLib.find ("U.S. States", "Columbia", "State Name") «Find states named "Columbia" in the "U.S. States" database. » 0 FilemakerLib.find ("U.S. States", {"Mary", "Ann"}, {"State Name", "State Capital"}) «Finds states whose name contains "Mary" and whose capital contains "Ann" » 1 Notes This verb is a reliable method of performing Filemaker finds. It is faster on large databases than FilemakerLib.simpleFind. This verb sends, at a minimum, five Apple events. The more fields to search, the more Apple events sent. See Also FilemakerLib.findAll FilemakerLib.simpleFind Verb FilemakerLib.findAll Syntax FilemakerLib.findAll (db) Parameters db is the name or number of the database whose current found set should include all records. Action Causes the current found set to contain all records. Returns True if successful, false otherwise. See Also FilemakerLib.find Verb FilemakerLib.getAllRecords Syntax FilemakerLib.getAllRecords (db, theLayout = 0, foundSet = true) Parameters db is the name or number of the database containing the records to retrieve. theLayout (optional, default is 0) is the name or number of the layout. foundSet (optional, default is true) specifies whether to retrieve all records in the foundSet (true) or in the entire database (false). Action Retrieves all records in either the current found set or the entire database. Returns A list of Filemaker records, or false if there are no records present. Examples FilemakerLib.getAllRecords ("U.S. States", foundSet: false) » {("Alabama", "Huntsville", "Lobster"}, {"Alaska", "Juneau", "Crabs"},...} See Also FilemakerLib.getFirstRecord FilemakerLib.getLastRecord FilemakerLib.getNthRecord FilemakerLib.getNRecords Verb FilemakerLib.getCellByRecordID Syntax FilemakerLib.getCellByRecordID (db, theCell, recordID, theLayout = 0) Parameters db is the name or number of the database containing the records and cells. theCell is the name of the cell containing the data to retrieve. recordID is the unique ID of the record. theLayout (optional, default is 0) specifies the layout. Action Retrieves data from the specified cell in the specified record. Returns The data if successful, false if the request failed. Examples FilemakerLib.getCellByRecordID ("U.S. States", "State Name", 3) » "Ohio" See Also FilemakerLib.setCellByRecordID FilemakerLib.getRecordByID FilemakerLib.setRecordByID FilemakerLib.getID Verb FilemakerLib.getCellNames Syntax FilemakerLib.getCellNames (db, theLayout = 0) Parameters db is the name or number of the database containing the cells. theLayout (optional parameter) is the name or number of the layout. Action Retrieves the names of the cells from Filemaker. Returns A list of cell names if successful, false if the request failed. Examples FilemakerLib.getCellNames ("U.S. States") » {"State Name", "State Capital", "Seafood specialty"} Notes Cell names are returned in the cell’s creation order. Use this same order when setting data. See Also FilemakerLib.getLayoutNames FilemakerLib.getFrontDBName Verb FilemakerLib.getCellNRecords Syntax FilemakerLib.getCellNRecords (db, theCell, firstRecord, numRecordsToGet, theLayout = 0, foundSet = true) Parameters db is the name or number of the database containing the cells to retrieve. theCell is the name of the cell to retrieve. firstRecord is the index of the first record. numRecordsToGet is the number of records from which to retrieve the cell. theLayout (optional, default is 0) is the name or number of the layout. foundSet (optional, default is true) determines whether the firstRecord applies to the current found set (true) or to the database (false). Action Retrieves the data for named cell from multiple records. Returns A list of data if the request is successful, false otherwise. Examples FilemakerLib.getCellNRecords ("U.S. States", "State Name", 1, 2, foundSet:false) «Retrieve state names » {"Alabama", "Alaska"} FilemakerLib.getCellNRecords ("U.S. States", 40, 15) «Ask for records that don’t exist » false See Also FilemakerLib.getCellNRecordsAsString FilemakerLib.setCellNRecords Verb FilemakerLib.getCellNRecordsAsString Syntax FilemakerLib.getCellNRecordsAsString (db, theCell, firstRecord, numRecordsToGet, theLayout = 0, foundSet = true) Parameters db is the name or number of the database containing the cells to retrieve. theCell is the name of the cell to retrieve. firstRecord is the index of the first record. numRecordsToGet is the number of records from which to retrieve the cell. theLayout (optional, default is 0) is the name or number of the layout. foundSet (optional, default is true) determines whether the firstRecord applies to the current found set (true) or to the database (false). Action Retrieves the data for named cell from multiple records. Returns The data as a string if the request is successful, false otherwise. Examples FilemakerLib.getCellNRecordsAsString ("U.S. States", "State Name", 2, 3, foundSet:false) «Retrieve state names » "Alaska\tArizona\tArkansas" FilemakerLib.getCellNRecordsAsString ("U.S. States", "State Name", 40, 15) «Ask for records that don’t exist » false Notes The values are tab-delimited. See Also FilemakerLib.getCellNRecords FilemakerLib.setCellNRecords Verb FilemakerLib.getCellNthRecord Syntax FilemakerLib.getCellNthRecord (db, theCell, recordNum, theLayout=0, foundSet=true) Parameters db is the name or number of the database containing the cell to retrieve. theCell is the name of the cell whose value you want. recordNum is the index of the record containing the cell. theLayout (optional, default is 0) is the name or number of the layout. foundSet (optional, default is true) specifies whether recordNum applies to the current found set (true) or to the database (false). Action Retrieves the data for a specific cell in a specific record. Returns True if the database was brought to front, false if it was not. Examples FilemakerLib.getCellNthRecord ("U.S. States", "State Name", 2, foundSet:false) » "Arizona" FilemakerLib.getCellNthRecord ("U.S. States", "State Name", 65) «We have only 50 states in the database » false See Also FilemakerLib.getCellNRecords FilemakerLib.getCellNRecordsAsString FilemakerLib.setCellNthRecord Verb FilemakerLib.getCellSize Syntax FilemakerLib.getCellSize (db, theCell, recordNum, theLayout = 0, foundSet = true) Parameters db is the name or number of the database containing the cell whose size you want to determine. theCell is the name of the cell whose size you want to determine. recordNum is the index of the record containing the cell. theLayout (optional, default is 0) is the name or number of the layout. foundSet (optional, default is true) specifies whether recordNum applies to the current found set (true) or to the database (false). Action Retrieves the size of a cell from Filemaker. Returns A number if the request was successful, false if unsuccessful. Examples FilemakerLib.getCellSize ("U.S. States", "State Name", 2) «"Maryland" is the second record in the current found set. » 8 FilemakerLib.getCellSize ("U.S. States", "State Name", 1, foundSet:false) «"Alabama" is the first record in the database » 7 See Also FilemakerLib.getDBSize FilemakerLib.getRecordSize Verb FilemakerLib.getDBSize Syntax FilemakerLib.getDBSize (db) Parameters db is the name or number of the database whose size you want to determine. Action Asks Filemaker to return the size of the specified database. Returns A number if successful, false otherwise. Examples FilemakerLib.getDBSize ("Non-existent database") » false FilemakerLib.getDBSize ("My Database") » 64860 See Also FilemakerLib.getCellSize FilemakerLib.getRecordSize Verb FilemakerLib.getFirstRecord Syntax FilemakerLib.getFirstRecord (db, theLayout = 0, foundSet = true) Parameters db is the name or number of the database containing the record. theLayout (optional, default is 0) is the name or number of the layout. foundSet (optional, default is true) specifies whether to return the first record of the current found set (true) or of the database (false). Action Retrieves the data for the first record. Returns A list of data if the request was successful, false otherwise. Examples FilemakerLib.getFirstRecord ("U.S. States", foundSet: false) » {"Alabama", "Huntsville", "Lobster"} FilemakerLib.getFirstRecord ("U.S. States") «"Delaware" is the first record in the current found set » {"Delaware", "Dover", "Kingfish"} See Also FilemakerLib.getLastRecord FilemakerLib.getNthRecord Verb FilemakerLib.getFrontDBName Syntax FilemakerLib.getFrontDBName () Parameters None. Action Gets the name of the frontmost database. Returns The name of the frontmost database, or false if the request fails. Examples FilemakerLib.getFrontDBName () « "My Database" is in front » "My Database" Notes This is a rarely-needed verb. The FilemakerLib verbs do not require the acted-upon database to be frontmost. See Also FilemakerLib.bringDBToFront FilemakerLib.hideWindow FilemakerLib.showWindow Verb FilemakerLib.getID Syntax FilemakerLib.getID (db, recordNum, foundSet = true) Parameters db is the name or number of the database that contains the record. recordNum is the index of the record whose unique ID you want. foundSet (optional, default is true) specifies whether recordNum relates to the current found set (true) or the database (false). Action Gets the unique ID of the specified record. Returns A number, the unique ID. Examples FilemakerLib.getID ("My Database", 1) «Get the unique ID of the first record in the found set. » 84 FilemakerLib.getID ("My Database", 4, false) «Get the unique ID of the fourth record in the database. » 7 See Also FilemakerLib.getRecordByID FilemakerLib.getCellByRecordID FilemakerLib.setRecordByID FilemakerLib.setCellByRecordID Verb FilemakerLib.getLastRecord Syntax FilemakerLib.getLastRecord (db, theLayout = 0, foundSet = true) Parameters db is the name or number of the database you want to make frontmost. theLayout (optional, default is 0) is the name or number of the layout. foundSet (optional, default is true) specifies whether to retrieve the last record in the current found set (true) or the last record in the database (false). Action Retrieves the data for the last record. Returns The data as a list. Examples FilemakerLib.getLastRecord ("U.S. States", foundSet:false) «Get the last record in the database » {"Wyoming", "Cheyenne", "No seafood"} See Also FilemakerLib.getFirstRecord FilemakerLib.getNthRecord Verb FilemakerLib.getLayoutNames Syntax FilemakerLib.getLayoutNames (db) Parameters db is the name or number of the database containing the layouts whose names you want to get. Action Asks Filemaker to return the names of the layouts. Returns A list of the layout names, or false if the request is unsuccessful. Examples FilemakerLib.getLayoutNames ("My Database") «Only has one default layout » {"Layout #1"} FilemakerLib.getLayoutNames ("U.S. States", 2) «Has two layouts, both named » {"States By Page", "States in Columns"} See Also FilemakerLib.getCellNames FilemakerLib.getFrontDBName Verb FilemakerLib.getNRecords Syntax FilemakerLib.getNRecords (db, firstRecord, numRecordsToGet, theLayout = 0, foundSet = true) Parameters db is the name or number of the database containing the records. firstRecord is the index of the first record to get. numRecordsToGet tells how many records to get. theLayout (optional, default is 0) is a name or number specifying the layout. foundSet (optional, default is true) specifies whether the records come from the current foundSet (true) or all records (false). Action Retrieves the specified records. Returns A list of Filemaker Pro records, or false if the request fails. Examples FilemakerLib.getNRecords ("U.S. States", 2, 2, foundSet:false) » {{"Alaska", "Juneau", "crabs"}, {"Arizona", "Phoenix", "prairie oysters"}) FilemakerLib.getNRecords ("U.S. States", 1, 2) «After searching for states whose name begins with "M" » {{"Maine", "Portland", "crabs"}, {"Maryland", "Annapolis", "crabs"}) FilemakerLib.getNRecords ("U.S. States", 2, 2, foundSet:false) » {{"Arizona", "Phoenix", "prairie oysters"}) See Also FilemakerLib.setNthRecord FilemakerLib.GetFirstRecord FilemakerLib.GetLastRecord Verb FilemakerLib.getNRecordsAsString Syntax FilemakerLib.getNRecordsAsString (db, firstRecord, numRecordsToGet, theLayout = 0, foundSet = true) Parameters db is the name or number of the database containing the records. firstRecord is the index of the first record to get. numRecordsToGet tells how many records to records to get. theLayout (optional, default is 0) is a name or number specifying the layout. foundSet (optional, default is true) specifies whether the records come from the current foundSet (true) or all records (false). Action Retrieves the specified records. Returns The specified Filemaker Pro records as a string, or false if the request fails. Examples FilemakerLib.getNRecords ("U.S. States", 2, 2, foundSet:false) » "Alaska\tJuneau\tcrabs\rArizona\tPhoenix\tprairie oysters\r" Notes Cells are tab-delimited. A return appears after every record. See Also FilemakerLib.getNRecords Verb FilemakerLib.getNthRecord Syntax FilemakerLib.getNthRecord (db, recordNum, theLayout = 0, foundSet = true) Parameters db is the name or number of the database containing the data. recordNum is the index of the record to retrieve. theLayout (optional, default is 0) is the name or number of the layout. foundSet (optional, default is true) specifies whether recordNum relates to the current found set (true) or to the database itself (false). Action Retrieves the contents of the specified record. Returns A list containing the data for the specified record, or false if the request fails. Examples FilemakerLib.getNthRecord ("My Contacts", 2, foundSet:false) «Retrieves the second record in the database » {"Smith", "John", "206-555-1212", "Denny Regrade"} FilemakerLib.getNthRecord ("My Contacts", 10) «There are only 7 records in the current found set » false See Also FilemakerLib.getNRecords FilemakerLib.getRecordByID FilemakerLib.setNthRecord Verb FilemakerLib.getRecordByID Syntax FilemakerLib.getRecordByID (db, recordID, theLayout = 0) Parameters db is the name or number of the database containing the record. recordID is the unique ID of the record containing the desired data. theLayout (optional, default is 0) is the name or number of the layout. Action Retrieves the data for the requested record. Returns A list of data, or false if the request fails. Examples FilemakerLib.getRecordByID ("My Contacts", 227) » {"Doe", "Jane", "212-555-1212", "Faroe Heights"} FilemakerLib.getRecordByID ("My Contacts", 154) «There is no record with this unique ID » false See Also FilemakerLib.getID FilemakerLib.setRecordByID Verb FilemakerLib.getRecordSize Syntax FilemakerLib.getRecordSize (db, recordNum, theLayout = 0, foundSet = true) Parameters db is the name or number of the database containing the record. recordNum is the index of the record whose size you want to determine. theLayout (optional, default is 0) is the name or number of the layout. foundSet (optional, default is true) specifies whether recordNum applies to the current found set (true) or to the database (false). Action Retrieves the size of the specified record. Returns A number if the request was successful, false otherwise. Examples FilemakerLib.getRecordSize ("My Database", 126) «There are less than 126 records in the current found set » false FilemakerLib.getRecordSize ("My Database", 126, foundSet: false) «There are more than 126 records in the entire database » 3248 See Also FilemakerLib.getCellSize FilemakerLib.getDBSize Verb FilemakerLib.hideWindow Syntax FilemakerLib.hideWindow (db) Parameters db is the name or number of the database whose window you want to hide. Action Hides the specified database’s window. Returns True. Examples FilemakerLib.hideWindow (1) «Hides the frontmost database. » true FilemakerLib.bringDBToFront ("U.S. States") «Hides the specified database. » true Notes On web-servers, it’s common to want to hide Filemaker’s windows. This improves Filemaker’s performance. See Also FilemakerLib.showWindow Verb FilemakerLib.isRunning Syntax FilemakerLib.isRunning () Parameters None. Action Checks if Filemaker is running. Returns True if Filemaker is running, false if it is not. See Also FilemakerLib.launch FilemakerLib.quit Verb FilemakerLib.launch Syntax FilemakerLib.launch () Parameters None. Action Launches Filemaker Pro. Returns True if request succeeds, false otherwise. Examples FilemakerLib.launch () » true See Also FilemakerLib.quit Verb FilemakerLib.lockDB Syntax FilemakerLib.lockDB (db, timeOut = 3600) Parameters db is the name or number of the database you want to temporarily lock. timeOut (optional, default is 3600) is the number of ticks (60ths of a second) to keep trying to lock the database. Action Prevents other threads from accessing the database and interfering with your script. Returns True if successful, false otherwise. Examples FilemakerLib.lockDB ("My Database") » true Notes This verb is the equivalent of calling semaphores.lock (db, 3600). Always surround this verb with a try...else statement. If your script cannot lock the database, your script should return an error. Use the lockDB and unlockDB verbs whenever more than one thread might access the Filemaker database. See Also FilemakerLib.unlockDB Verb FilemakerLib.newRecord Syntax FilemakerLib.newRecord (db, dataList = {}, theLayout = 0) Parameters db is the name or number of the database in which a new record will be created. dataList (optional, default is an empty list) is the data to place in the new record. If dataList is empty, the new record will also be empty. theLayout (optional parameter) is the name or number of the layout. Action Creates a new record at the end of the specified Filemaker database. Returns True if successful, false otherwise. Examples FilemakerLib.newRecord ("U.S. States", {"Puerto Rico", "San Juan", "Marlin"}) «Puerto Rico has been added as the 51st state. » true See Also FilemakerLib.setNthRecord Verb FilemakerLib.nthRecordExists Syntax FilemakerLib.nthRecordExists (db, recordNum, foundSet = true) Parameters db is the name or number of the database containing the record. recordNum is the index of the record whose existence we want to determine. foundSet (optional, default is true) specifies whether recordNum applies to the current found set (true) or to the database (false). Action Checks to see if the specified record exists. Returns True if the record exists, false if it does not. Examples FilemakerLib.recordExists ("My Database", 8474, false) «"My Database" has fewer than 8474 records » false FilemakerLib.recordExists ("My Database", 3) «There is a third record in the current found set » true Verb FilemakerLib.open Syntax FilemakerLib.open (dbPath) Parameters dbPath is the path to the database to be opened. Action Opens the specified database in Filemaker. Returns True if successful, false otherwise. Examples FilemakerLib.open ("Macintosh HD:Databases:My Database") «Opens my database » true See Also FilemakerLib.openDocument FilemakerLib.close Verb FilemakerLib.openDocument Syntax FilemakerLib.openDocument (dbPath) Parameters dbPath is the path to the database to be opened. Action Opens the specified database in Filemaker. Returns True if successful, false otherwise. Examples FilemakerLib.openDocument ("Macintosh HD:Databases:My Database") «Opens my database » true See Also FilemakerLib.open FilemakerLib.close Verb FilemakerLib.openFilemakerFolder Syntax FilemakerLib.openFilemakerFolder () Parameters None. Action Opens the folder containing Filemaker Pro. Returns True if successful, false otherwise. Examples FilemakerLib.openFilemakerFolder () » true Verb FilemakerLib.packDB Syntax FilemakerLib.packDB (dbPath, adrTable) Parameters db is the name or number of the database you want to pack into your Frontier root. adrTable is the address of the Frontier table in which to pack the database. Action Packs the database as a binary object into the specified table in the Frontier root. Returns True if successful, false otherwise. Examples FilemakerLib.packDB ("Macintosh HD:Database:My Database", @user.databases) «pack "My Database" into user.databases table » true See Also FilemakerLib.unpackDB Verb FilemakerLib.quit Syntax FilemakerLib.quit () Parameters None. Action Quits Filemaker Pro. Returns True if the request is successful, false otherwise. See Also FilemakerLib.launch Verb FilemakerLib.sendToBack Syntax FilemakerLib.sendToBack () Parameters None. Action Hides Filemaker in the background. Returns True if successful, false otherwise. See Also FilemakerLib.bringToFront Verb FilemakerLib.setCellByRecordID Syntax FilemakerLib.setCellByRecordID (db, dataString, theCell, recordID, theLayout=0) Parameters db is the name or number of the database containing the records. dataString is the string to which the contents of the cell will be set. theCell is the name of the cell. recordID is the unique ID of the record. theLayout (optional, default is 0) is the name or number of the layout. Action Sets data for the specified cell in the specified record. Returns True if successful, false otherwise. Examples FilemakerLib.setCellByRecordID ("U.S. States", "Mississippi", 22) «The unique ID of Mississippi’s record is 22 » true See Also FilemakerLib.getCellByRecordID Verb FilemakerLib.setCellNRecords Syntax FilemakerLib.setCellNRecords (db, dataString, theCell, firstRecord, numRecordsToSet, theLayout = 0, foundSet = true) Parameters db is the name or number of the database containing of the records. dataString is the data to which the cells will be set. firstRecord is the index of the first record. numRecordsToSet is the number of records. theLayout (optional, default is 0) is the name or number of the layout. foundSet (optional, default is true) determines whether records in the current found set will be set (true) or records in the database (false). Action Sets a cell in multiple records to the specified data. Returns True if successful, false otherwise. Examples FilemakerLib.setCellNRecords ("U.S. States", "Lobster", "Seafood Specialty", 2, 5) « Sets cell "Seafood Specialty" to "Lobster" for records 2 through 7 of the current found set » true See Also FilemakerLib.getCellNRecords FilemakerLib.setCellNthRecord Verb FilemakerLib.setCellNthRecord Syntax FilemakerLib.setCellNthRecord (db, recordNum, theCell, theData, theLayout=0, foundSet=true) Parameters db is the name or number of the database you want to make frontmost. recordNum is the index of the record containing the cell whose data will be set. theCell is the name of the cell whose data will be set. theData is the data to which the cell will be set. theLayout (optional, default is 0) is the name or number of the layout. foundSet (optional, default is true) determines whether recordNum applies to the current found set (true) or to the database (false). Action Sets the data for a specified cell in a specified record. Returns True if successful, false otherwise. Examples FilemakerLib.setCellNthRecord ("U.S. States", 16, "StateName", "Mystery State", foundSet:false) «Change the name of state 16 (Kansas) to "Mystery State" » true See Also FilemakerLib.getCellNRecords Verb FilemakerLib.setNthRecord Syntax FilemakerLib.setNthRecord (db, recordNum, dataList, theLayout = 0, foundSet = true) Parameters db is the name or number of the database containing the record. recordNum is the index of the record whose data you want to set. dataList is the list of data to be set. theLayout (optional, default is 0) specifies which layout. foundSet (optional, default is true) specifies whether or not recordNum applies to the current found set or to the database. Action Sets the data for the specified record. Returns True if successful, false otherwise. Examples FilemakerLib.setNthRecord ("U.S. States", 3, {"Arizona", "Phoenix"}, foundSet:false) «Sets the data for the 3rd record in the database » true See Also FilemakerLib.getNthRecord FilemakerLib.setRecordByID Verb FilemakerLib.setRecordByID Syntax FilemakerLib.setRecordByID (db, recordID, dataList, theLayout = 0) Parameters db is the name or number of the database containing the record. theLayout (optional, default is 0) is the name or number of the layout. recordID is the unique ID of the record whose data you want to set. dataList is a list of data to set. Items should be in the same order as the creation order of fields. theLayout (optional parameter) is the name or number of the layout. Action Sets the data for a record. Returns True if successful, false otherwise. Examples FilemakerLib.setRecordByID ("My Contacts", 2, {"Smith", "John", "206-555-1212"}) «Sets the data for the record whose unique ID is 2. » true See Also FilemakerLib.getID FilemakerLib.setCellByRecordID FilemakerLib.getRecordByID FilemakerLib.getCellByRecordID Verb FilemakerLib.showWindow Syntax FilemakerLib.showWindow (db) Parameters db is the name or number of the database whose window you want to make visible. Action Makes the specified database’s window visible. Returns True if the request succeeded, false otherwise. Examples FilemakerLib.showWindow ("My Database") «Makes "My Database" visible » true Notes On web-servers, it’s common to want to hide Filemaker’s windows. This improves Filemaker’s performance. See Also FilemakerLib.hideWindow Verb FilemakerLib.simpleFind Syntax FilemakerLib.simpleFind (db, searchString, theCell, theLayout = 0) Parameters db is the name or number of the database to search. searchString is the string to be found in theCell. theCell is the name of the cell in which to search. theLayout (optional, default is 0) is the name or number of the layout. Action Retrieves all records matching the search criteria. Returns A list of data, or false if no records match the criteria. Examples FilemakerLib.simpleFind ("U.S. States", "Ala", "State Name") » {{"Alabama", "Huntsville", "Lobster"}, {"Alaska", "Juneau", "Crabs"}} Notes This verb is most suited to small, flat databases. Larger and more complex databases should use FilemakerLib.find, which will be faster despite sending more Apple events. See Also FilemakerLib.find Verb FilemakerLib.sort Syntax FilemakerLib.sort (db, sortBy, theLayout = 0) Parameters db is the name or number of the database you want to sort. sortBy is the name or number of the field you want to sort by. theLayout (optional, default is 0) can be a specific layout. Action Sorts the database in ascending order by the field specified. Returns True if the request was successful, false otherwise. Examples FilemakerLib.sort ("U.S. States", "State Name") «Sort by state » true FilemakerLib.sort (1, 2) «Sort the frontmost database by its second field » true Notes This is a very simple sort. For more complex sorting, use this script as an example and see filemaker.sort. See Also FilemakerLib.unsort Verb FilemakerLib.unlockDB Syntax FilemakerLib.unlockDB (db) Parameters db is the name or number of the database you want to unlock. Action Allows other threads to send events to Filemaker that manipulate the specified database. Returns True. Examples FilemakerLib.unlockDB ("My Database") «Allows other threads to interact with "My Database" » true Notes This verb is the equivalent of calling semaphores.unlock (db). See Also FilemakerLib.lockDB Verb FilemakerLib.unpackDB Syntax FilemakerLib.unpackDB (adrDatabase, folderPath) Parameters adrDatabase is the address of a Filemaker database packed as a binary object in the Frontier.root. folderPath is the path to the destination folder. Action Places an unpacked copy of the database on your hard drive in the specified folder. Returns True if the request was successful, false otherwise. Examples FilemakerLib.unpackDB (@user.databases.myDatabase, "Macintosh HD:Databases:") «Unpacks "My Database" and places it in my databases folder. » true See Also FilemakerLib.packDB Verb FilemakerLib.unsort Syntax FilemakerLib.unsort (db) Parameters db is the name or number of the database you want to unsort. Action Unsorts the database. Returns True if successful, false if the request failed. Examples FilemakerLib.unsort ("My Database") » true See Also FilemakerLib.sort